<template>
    <component :is='componentName' :changeComponent='changeComponent'></component>
</template>

<script>
import Layout from './components/layout.vue';
import {Component ,Vue} from "vue-property-decorator";

@Component({
    components:{
        'layout':Layout
    }
})
class App extends Vue{
    componentName='layout';
    changeComponent(name){
        this.componentName=name
    }
}
export default App;
</script>

<style lang="scss">
html,body{
    height: 100%;
    margin:0;
    padding:0;
}
</style>
